<template>
	<view class="">
		<view class="mainpadding radius " style="background-color: #c1282e;">
			<view class="flexcolumn">
				<view class="xiaobai titletext bold">余额</view>
				<view class="xiaobai margin_top bold" style="font-size: 40rpx;">{{dataAll.yjnb_money}}</view>
				<view class="baibtn xiaobai margin_top" @click="jumpurl('/pages/tab4/chongzhi')">充值</view>
			</view>
			<view class="flexbetween topcontent margin_top6">
				<view class="flexcolumn">
					<view class="titletext xiaobai bold">{{dataAll.curr_zb_num}}</view>
					<view class="margin_top1 xiaobai main_size" style="color: #efefef;">当前在保</view>
				</view>
				<view class="myline ffffff"></view>
				<view class="flexcolumn">
					<view class="titletext xiaobai bold">{{dataAll.today_buy_zb_num}}</view>
					<view class="margin_top1 xiaobai main_size" style="color: #efefef;">今日购保</view>
				</view>
				<view class="myline ffffff"></view>
				<view class="flexcolumn">
					<view class="titletext xiaobai bold">{{dataAll.today_tb_num}}</view>
					<view class="margin_top1 xiaobai main_size" style="color: #efefef;">今日停保</view>
				</view>
			</view>
		</view>
		<view class="ffffff radius" style="border-radius: 16rpx; padding: 40rpx 30rpx;">
			<view class="flexbetween  pdl" @click="jumpurl('/pages/tab4/goubaostart')">
				<view class="flexleft">
					<u-icon name="pushpin-fill" size="19" color="#c1282e"></u-icon>
					<view class="titletext hei_text bold margin_left">购保</view>
				</view>
				<u-icon name="arrow-right" size="16" color="#999"></u-icon>
			</view>
			<view class="flexbetween margin_top4 pdl" @click="jumpurl('/pages/tab4/goubaojl')">
				<view class="flexleft">
					<u-icon name="pushpin-fill" size="19" color="#c1282e"></u-icon>
					<view class="titletext hei_text bold margin_left">购保记录</view>
				</view>
				<u-icon name="arrow-right" size="16" color="#999"></u-icon>
			</view>
			<view class="flexbetween margin_top4 pdl" @click="jumpurl('/pages/tab4/chongzhijl')">
				<view class="flexleft">
					<u-icon name="pushpin-fill" size="19" color="#c1282e"></u-icon>
					<view class="titletext hei_text bold margin_left">充值记录</view>
				</view>
				<u-icon name="arrow-right" size="16" color="#999"></u-icon>
			</view>
			<view class="margin_top4 flexbetween" @click="jumpurl('/pages/tab4/yuejl')">
				<view class="flexleft">
					<u-icon name="pushpin-fill" size="19" color="#c1282e"></u-icon>
					<view class="titletext hei_text bold margin_left">余额记录</view>
				</view>
				<u-icon name="arrow-right" size="16" color="#999"></u-icon>
			</view>
		</view>
		
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				dataAll:{}
			}
		},
		onShow() {
			this.init()
		},
		methods: {
			init() {
				httpRequest.request('/api/user/yjnbData', 'GET', {}).then(res => {
					this.dataAll = res.data
				})
			},
			jumpurl(url){
				uni.navigateTo({
					url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
.baibtn {
		width: 194rpx;
		height: 65rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		border-radius: 10rpx;
		border: 2rpx solid #FFFFFF;
		font-size: 28rpx;
		font-family: PingFang SC-Medium, PingFang SC;
		font-weight: 500;
		color: #fff;
	}
	.topcontent {
		padding: 30rpx 40rpx;
		background: rgba(255, 255, 255, 0.2);
		border-radius: 16rpx 16rpx 16rpx 16rpx;
		border: 1rpx solid rgba(255, 255, 255, 0.6);
	}
	
	.myline {
		width: 1rpx;
		height: 40rpx;
		background-color: rgba(255, 255, 255, 0.4);
	}
</style>
